package com.hkbigdata.transform;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author liuanbo
 * @creat 2023-03-18-12:56
 * @see 2194550857@qq.com
 */
public class Flink03_TransForm_Fliter_Lambda {
    @Override
    public int hashCode() {
        return super.hashCode();
    }

    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        env.fromElements(1, 3, 5, 8, 12)
                .filter(data ->
                        data % 2 == 0
                ).print();

        env.execute();
    }
}
